package com.ht.pms.core.common.constant;

public enum SalaryTemplateTableEnum {
	ATTEND_TEMPLATE(1, "考勤模板", "KQ", "t_dict_record_a"), 
	SALARY_TEMPLATE(2, "工资模板", "XZ","t_dict_record_b"), 
	BASE_TEMPLATE(3, "基础模板", "JC", "t_dict_record_c");

	private int templateType;

	private String templateName;

	private String batchCodePrefix;

	private String relationTable;
	
	

	private SalaryTemplateTableEnum(int templateType, String templateName, String batchCodePrefix, String relationTable) {
		this.templateType = templateType;
		this.templateName = templateName;
		this.batchCodePrefix = batchCodePrefix;
		this.relationTable = relationTable;
	}

	public int getTemplateType() {
		return templateType;
	}

	public void setTemplateType(int templateType) {
		this.templateType = templateType;
	}

	public String getTemplateName() {
		return templateName;
	}

	public void setTemplateName(String templateName) {
		this.templateName = templateName;
	}

	public String getBatchCodePrefix() {
		return batchCodePrefix;
	}

	public void setTemplateCode(String batchCodePrefix) {
		this.batchCodePrefix = batchCodePrefix;
	}

	public String getRelationTable() {
		return relationTable;
	}

	public void setRelationTable(String relationTable) {
		this.relationTable = relationTable;
	}

	public static SalaryTemplateTableEnum getByTemplateType(int templateType) {
		for (SalaryTemplateTableEnum salaryTemplateTableEnum : SalaryTemplateTableEnum.values()) {
			if(salaryTemplateTableEnum.templateType == templateType) {
				return salaryTemplateTableEnum;
			}
		}
		return null;
	}

}
